package priv.yiyuan.example.composite;

/**
 * 段落类
 * <p>
 * 组合模式-叶子节点
 *
 * @author YiYuan
 * @data 2025/8/28
 * @apoNote
 */
public class Paragraph implements DocumentComponent {

    private String text;

    public Paragraph(String text) {
        this.text = text;
    }

    @Override
    public void render() {
        System.out.println("<p>" + text + "</p>");
    }
}
